package leetcode;

import java.util.Arrays;

/**
 * @Project : ProgrammingExercises
 * @Package : Leetcode
 * @File : Q2553.java
 * @Author : WangRuoyu
 * @Date 2023/2/20 15:29
 */

public class Q2553 {
    public int[] separateDigits(int[] nums) {
        String str = "";
        for (int num : nums) {
            str += Integer.toString(num);
        }

        int[] res = new int[str.length()];
        for (int i = 0; i < str.length(); ++i) {
            res[i] = (int) (str.charAt(i) - '0');
        }

        return res;
    }

    public static void main(String[] args) {
        Q2553 sl = new Q2553();
        int[] nums = {13, 25, 83, 77};
        System.out.println(Arrays.toString(sl.separateDigits(nums)));
    }
}